﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Power.Models
{
    /// <summary>
    /// 管段信息
    /// </summary>
    public class PipEntity //: NotifyPropertyChangedBase ,IsChangedInterface<PipInfo>
    {
        public PipEntity()
        {
        }

        // 管段id
        private int _psId;
        public int PsId
        {
            get { return _psId; }
            set { _psId = value; }//OnPropertyChanged(); }
        }
        // 管段序号
        private int _no;
        public int No
        {
            get { return _no; }
            set { _no = value; }//OnPropertyChanged(); }
        }

        //起点埋深
        private double _eginBuriedDepth;
        public double BeginBuriedDepth
        {
            get { return _eginBuriedDepth; }
            set { _eginBuriedDepth = value; }//OnPropertyChanged(); }
        }
        //终点埋深
        private double endBuriedDepth;
        public double EndBuriedDepth
        {
            get { return endBuriedDepth; }
            set { endBuriedDepth = value; }//OnPropertyChanged(); }
        }

        //类型
        private string _type;
        public string Type
        {
            get { return _type; }
            set { _type = value; }//OnPropertyChanged(); }
        }
        //材质
        private string _mat;
        public string Mat
        {
            get { return _mat; }
            set { _mat = value; }//OnPropertyChanged(); }
        }
        //直径
        private double _diameter;
        public double Diameter
        {
            get { return _diameter; }
            set { _diameter = value; }//OnPropertyChanged(); }
        }
        //长度
        private double _length;
        public double Length
        {
            get { return _length; }
            set { _length = value; }//OnPropertyChanged(); }
        }
        //地区参数
        private string _areaParam;
        public string AreaParam
        {
            get { return _areaParam; }
            set { _areaParam = value; }//OnPropertyChanged(); }
        }
        //土质参数
        private string _solidParam;
        public string SolidParam
        {
            get { return _solidParam; }
            set { _solidParam = value; }//OnPropertyChanged(); }
        }
        //敷设年代
        private string _buildDate;
        public string BuildDate
        {
            get { return _buildDate; }
            set { _buildDate = value; }//OnPropertyChanged(); }
        }

        public bool IsChanged(PipEntity raw)
        {
            return Type != raw.Type || Mat != raw.Mat || Diameter != raw.Diameter || Length != raw.Length
                || AreaParam != raw.AreaParam || SolidParam != raw.SolidParam || BuildDate != raw.BuildDate
                || EndBuriedDepth != raw.EndBuriedDepth || BeginBuriedDepth != raw.BeginBuriedDepth;
        }
    }
}
